<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <!-- <link rel="shortcut icon" href="favicon.ico"> -->
     <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .radio-inline input[type=radio] {
            margin-top: 4px
        }
        .borRed{border:1px solid red;padding: 4px;}
        .textBorder{border-color: red}
    </style>
</head>

<body style="color:#333;padding:3px;overflow-x: auto;">
    <!-- 标题 -->
    <div class="page-heade">
      <h1 class="title_color">TI费用核销申请-查询</h1>
    </div>
    <!-- 标题 -->
    <div >
    <form action="" class="form-inline">
      <table class="table table-bordered bud_hei" style="margin-top:0">
          <tr>
             <td><span class="font-bold">您选择的经销商是：东菀市宝多丰贸易有限公司(3102)</span>
              <button class="btn btn-warning" type="button" onclick="back()">点击返回上一步</button>
              <a href="add_ticostapply.html" class="btn-info btn">点击更换经销商</a>
             </td>
          </tr>
          <tr>
              <td>
              <a href="ticostverify_query.html" class="btn btn-primary">可核销</a>
              <a href="ticostverify_query.html" class="btn btn-primary">核销中</a>
              <a href="ticostverify_query.html" class="btn btn-primary">不予核销</a>
              <a href="ticostverify_query.html" class="btn btn-primary">未反馈</a>
              <a href="ticostverify_query.html" class="btn btn-primary">未核查</a>
              <a href="ticostverify_query.html" class="btn btn-primary">已锁定</a>
              </td>
          </tr>
          <tr>
              <td class="colorRed">温馨提示：一旦核销，原申请整单都不允许再做异动、取消、反馈。谢谢</td>
          </tr>
            <tr>
              <td class="font-bold">请选择下列要核销的记录后，点击"生成核销面单预览"按钮后即可核销。</td>
          </tr>
      </table>
      <table class="table table-bordered bud_hei text-center">
          <tr class="info">
            <th style="min-width: 30px;width: 30px" class="text-center" rowspan="2">序号</th>
            <th style="min-width: 20px" class="text-center" rowspan="2"><input type="checkbox" id="checkAll" class="form-control"></th>
            <th style="min-width: 80px" class="text-center" rowspan="2">申请人</th>
            <th style="min-width: 120px" class="text-center" rowspan="2">原申请文件</th>
            <th style="min-width: 120px" class="text-center" rowspan="2">明细编号</th>
            <th style="min-width: 80px" class="text-center" rowspan="2">核查结果</th>
            <th style="min-width: 180px" class="text-center" rowspan="2">网点名称</th>
            <th style="min-width: 180px" class="text-center" rowspan="2">系统名称</th>
            <th style="min-width: 120px" class="text-center" rowspan="2">品牌</th>
            <th style="min-width: 120px" class="text-center" rowspan="2">三级费用科目</th>
            <th class="text-center" colspan="3">实际投入</th>
            <th class="text-center" colspan="8"></th>
             <th style="min-width: 80px" class="text-center" rowspan="2">余额不予核销</th>
             <th style="min-width: 100px;" class="text-center" rowspan="2">活动开始日期</th>
             <th style="min-width: 100px" class="text-center" rowspan="2">支付方式</th>
             <th style="min-width: 100px" class="text-center" rowspan="2">备注</th>
             <th style="min-width: 140px" class="text-center" rowspan="2">操作</th>
          </tr>
          <tr class="info">
            <th style="min-width: 100px;width: 100px;" class="text-center">实际投入金额</th>
            <th style="min-width: 100px;width: 100px;" class="text-center">已核销金额</th>
            <th style="min-width: 100px;width: 100px;" class="text-center">未核销金额</th>
            <th style="min-width: 100px;width: 100px;" class="text-center">未税核销金额</th>
            <th style="min-width: 140px" class="text-center">
            有无发票<br><button type="button" class="btn-info" id="is_fap">批量设置</button>
            </th>
             <th style="min-width: 140px;width: 140px;" class="text-center">
            发票号<span class="colorRed font-bold">?</span><br><button type="button" class=" btn-info" id="setFpNum">批量设置</button><span class="helpText">帮</span>
            </th>
             <th style="min-width: 140px" class="text-center">
            是否增值税<br>(可抵扣)<span class="colorRed font-bold">?</span>
            </th>
             <th style="min-width: 100px" class="text-center">
            税率<span class="colorRed font-bold">?</span>
            </th>
           <th style="min-width: 100px" class="text-center">税金</th> 
           <th style="min-width: 100px;width: 120px;" class="text-center">含税核销金额</th> 
           <th style="min-width: 120px;width: 120px;" class="text-center">实际投入金额</th> 
          </tr>
          <tr>
          <td>1</td>
          <td><input type="checkbox" name="items" class="form-control"></td>
          <td>张三</td>
          <td><a href="fomalcuxiaoapply.html">201708100012</a></td>
          <td>201708100012_1</td>
          <td>无</td>
          <td><a href="javascript:;">b石龙镇金沙湾购物广场*</a></td>
          <td><a href="javascript:;">b石龙镇金沙湾购物广场*</a></td>
          <td>元朗</td>
          <td>促销折让与折扣</td>
          <td class="ObjectNum">10800</td>
          <td class="ObjectNum">0</td>
          <td class="ObjectNum">10800</td>
          <td><input type="text" class="form-control" value="10800.00" style="min-width: 100px;width: 100px"></td>
          <td>
            <div class="form-group radioDiv">
            <label class="radio-inline">
              <input type="radio" name="ionse1" value="option1" >有
            </label>
             <label class="radio-inline">
                  <input type="radio" name="ionse1" value="option2">无
            </label>
            </div>
          </td>
          <td><input type="text" name="" class="form-control"></td>
          <td>
            <div class="form-group">
              <label class="radio-inline">
                <input type="radio" name="ionsx" value="optionsa" >是
              </label>
               <label class="radio-inline">
                    <input type="radio" name="ionsx" value="option2a">否
              </label>
            </div>
          </td>
          <td><input type="text" style="min-width: 60px;width: 60px;" class="form-control" name="">%</td>
             <td><input type="text" style="min-width: 80px;width: 80px;" class="form-control" name=""></td>
          <td><input type="text" class="form-control" placeholder="" name=""></td>
          <td><input type="text" class="form-control" placeholder="" name=""></td>
          <td><input type="checkbox" name="items1" class="form-control"></td>
          <td><input type="text" class="form-control layer-date" name="" id="dateTime"></td>
          <td><select name="" id="" class="form-control">
              <option value="0">货补</option>
              <option value="1">账扣</option>
              <option value="2">现金</option>
              <option value="3">转账</option>
          </select></td>
          <td><input type="text" name="" class="form-control"></td>
          <td><button type="button" class="btn-info">本条不予核销</button></td>
          </tr>
        <tr>
          <td>2</td>
          <td><input type="checkbox" name="items" class="form-control"></td>
          <td>张三</td>
          <td><a href="fomalcuxiaoapply.html">201708100012</a></td>
          <td>201708100012_1</td>
          <td>无</td>
          <td><a href="javascript:;">b石龙镇金沙湾购物广场*</a></td>
          <td><a href="javascript:;">b石龙镇金沙湾购物广场*</a></td>
          <td>元朗</td>
          <td>促销折让与折扣</td>
          <td class="ObjectNum">10800</td>
          <td class="ObjectNum">0</td>
          <td class="ObjectNum">10800</td>
          <td><input type="text" class="form-control" value="10800.00" style="min-width: 100px;width: 100px"></td>
          <td>
            <div class="form-group radioDiv">
                <label class="radio-inline">
                  <input type="radio" name="ionse2" value="option1" >有
                </label>
                 <label class="radio-inline">
                      <input type="radio" name="ionse2" value="option2">无
                </label>
            </div>
          </td>
          <td><input type="text" name="is_fapNum" class="form-control"></td>
          <td>
            <div class="form-group">
              <label class="radio-inline">
                <input type="radio" name="ionsx" value="optionsa" >是
              </label>
               <label class="radio-inline">
                    <input type="radio" name="ionsx" value="option2a">否
              </label>
            </div>
          </td>
          <td><input type="text" style="min-width: 60px;width: 60px;" class="form-control" name="">%</td>
             <td><input type="text" style="min-width: 80px;width: 80px;" class="form-control" name=""></td>
          <td><input type="text" class="form-control" placeholder="" name=""></td>
          <td><input type="text" class="form-control" placeholder="" name=""></td>
          <td><input type="checkbox" name="items1" class="form-control"></td>
          <td><input type="text" class="form-control layer-date" name="" id="dateTime"></td>
          <td><select name="" id="" class="form-control">
              <option value="0">货补</option>
              <option value="1">账扣</option>
              <option value="2">现金</option>
              <option value="3">转账</option>
          </select></td>
          <td><input type="text" name="" class="form-control"></td>
          <td><button type="button" class="btn-info">本条不予核销</button></td>
          </tr>
      </table>
      <table class="table-bordered table">
          <tr>
            <td rowspan="3" class="text-center" style="min-width: 120px;width: 120px">备注:</td>
            <td><textarea name="" id="" class="form-control" style="width: 60%;overflow: auto;"></textarea><span style="vertical-align: bottom;">(500)</span></td>
          </tr>
      </table>
        <p class="colorRed">温馨提示：<br>
         1.如果有明细单不需要核销，请在该费用明细最后面点击："本条不予核销"按钮。<br>
         2.如核销一部分，所剩费用余额不需要核销,请勾选："余额不予核销"。
    </p>
         <div class="footer fixed_full text-center" style="height: auto;border:0;padding: 0;">
       <table class="table-bordered table text-center" style="margin:0;padding: 0;background: #f3f3f4">
          <tr>
            <td>未税金额合计：<span class="colorRed font-bold ObjectNum">0</span>元；<button type="button" class="btn-primary btn" id="modify_notax">修改未税金额</button></td>
             <td>税金合计：<span class="colorRed font-bold ObjectNum">0</span>元；<button type="button" class="btn-primary btn" id="setFpInfo">设置发票信息</button></td>
             <td rowspan="2">
              <button type="button" class="btn-primary btn" id="create_verify_yl">生成核销申请预览</button>
             </td>
          </tr>
          <tr>
               <td>含税税金额合计：<span class="colorRed font-bold ObjectNum">0</span>元；<button type="button" class="btn-primary btn" id="modify_tax">修改含税金额</button></td>
               <td><input name="items1" type="checkbox" id="checkboxAll1">设置余额不予核销</td>
          </tr>
       </table>
    </div>
    </form>
    </div>
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
     <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
       <script src="__STATIC__/layout/js/common.js"></script>
     <script>
        laydate({
            elem: '#dateTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
        });
       
         $(document).ready(function(){
         

        /*设置发票信息*/
        

        /*进入按网点反馈页面*/
          $("#toNetFk").click(function(){
              var _$this=this
                swal({ 
              title: "", 
              text: "页面跳转后，当前页面已编辑的数据将不被保存，您确定跳转吗？", 
              type: "warning",
              showCancelButton: true, 
              confirmButtonColor: "#DD6B55",
              confirmButtonText: "确定", 
              cancelButtonText: "取消",
              closeOnConfirm: false, 
              closeOnCancel: false
            },
            function(isConfirm){ 
              if (isConfirm) { 
                // console.log(_$this);
                swal("", "","success"); 
                location.href="roijcyj.html"
              } else { 
                swal("取消！", "","error"); 
              } 
          });
             })
          /*设置checkbox*/
            /*checkbox选择*/
            $("#checkAll").click(function() {

            $("[name=items]:checkbox").prop("checked", $(this).prop("checked"));
            if ($("[name=items]:checkbox").prop("checked") != true) {
                // console.log($(this))
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#fff")
            } else {
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#f8f800")

            }
        })
        $("[name=items]:checkbox").click(function() {
            //定义一个临时变量，避免重复使用同一个选择器选择页面中的元素，提高程序效率
            // console.log(1)
            var $tmp = $("[name=items]:checkbox");
            if ($(this).prop("checked") != true) {
                // console.log($(this))
                $(this).parent().parent().css("backgroundColor", "#fff")
            } else {
                $(this).parent().parent().css("backgroundColor", "#f8f800")

            }
            //用filter()方法筛选出选中的复选框，并直接给CheckedAll赋值
            $("#checkAll").prop('checked', $tmp.length == $tmp.filter(':checked').length);

          })
        /*设置有无发票*/
        $("#is_fap").click(function(){
               var str = '<form method="get" class="form-inline" style="margin:10px"><table class="table-bordered table"><tr><th class="info text-center" colspan="2">批量设置有无发票</th></tr><tr><td style="min-width:120px;width:120px;" class="text-center">有无发票<span class="colorRed">*</span></td><td><label class="radio-inline"><input type="radio" name="inlineRadioOptionse" value="option1" >有</label><label class="radio-inline"><input type="radio" name="inlineRadioOptionse" value="option2">无</label></td></tr></table> <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0"><input type="submit" class="btn btn-success" value="确定"><input type="button" class="btn btn-warning" value="返回" id="cancelBack" style="margin-left:20px"></div></form>'
            layer.open({
              type: 1,
              title:"",
              skin: 'layui-layer-rim', //加上边框
              area: ['500px', '300px'], //宽高
              content: str
            });
              var cancelBack = document.getElementById('cancelBack')
              cancelBack.onclick = function(){
               layer.closeAll(); 
               }
        })
        /*修改未税金额*/
        $("#modify_notax").click(function(){
           var str = '<form method="get" class="form-inline" style="margin:10px"><table class="table-bordered table"><tr><th class="info text-center" colspan="2">TI核销修改未税金额</th></tr><tr><td style="min-width:140px;width:140px;" class="text-center">原未税金额(元)</td><td><span class="ObjectNum">22,656.00</span></td></tr><tr><td style="min-width:140px;width:140px;" class="text-center">修改后未税金额(元)</td><td><input type="text" name="" class="form-control" style="min-width:100px;width:100px;"/></td></tr></table> <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0"><input type="submit" class="btn btn-success" value="确认提交"><input type="button" class="btn btn-warning" value="关闭返回" id="cancelBack" style="margin-left:20px"></div></form>'
            layer.open({
              type: 1,
              title:"TI核销修改未税金额",
              skin: 'layui-layer-rim', //加上边框
              area: ['500px', '300px'], //宽高
              content: str
            });
              var cancelBack = document.getElementById('cancelBack')
              cancelBack.onclick = function(){
               layer.closeAll(); 
               }
        })
        /*修改含税金额*/
        $("#modify_tax").click(function(){
           var str = '<form method="get" class="form-inline" style="margin:10px"><table class="table-bordered table"><tr><th class="info text-center" colspan="2">TI核销修改含税金额</th></tr><tr><td style="min-width:140px;width:140px;" class="text-center">原含税金额(元)</td><td><span class="ObjectNum">22,656.00</span></td></tr><tr><td style="min-width:140px;width:140px;" class="text-center">修改后含税金额(元)</td><td><input type="text" name="" class="form-control" style="min-width:100px;width:100px;"/></td></tr></table> <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0"><input type="submit" class="btn btn-success" value="确认提交"><input type="button" class="btn btn-warning" value="关闭返回" id="cancelBack" style="margin-left:20px"></div></form>'
            layer.open({
              type: 1,
              title:"TI核销修改含税金额",
              skin: 'layui-layer-rim', //加上边框
              area: ['500px', '300px'], //宽高
              content: str
            });
              var cancelBack = document.getElementById('cancelBack')
              cancelBack.onclick = function(){
               layer.closeAll(); 
               }
        })
        /*批量设置发票号*/
        $("#setFpNum").click(function(){
            var str = '<form method="get" class="form-inline" style="margin:10px"><table class="table-bordered table"><tr><th class="info text-center" colspan="2">批量设置发票号</th></tr><tr><td style="min-width:120px;width:120px;" class="text-center">发票号<span class="colorRed">*</span>：</td><td><input type="text" name="" class="form-control"/></td></tr></table> <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0"><input type="submit" class="btn btn-success" value="确定"><input type="button" class="btn btn-warning" value="返回" id="cancelBack" style="margin-left:20px"></div></form>'
            layer.open({
              type: 1,
              title:"",
              skin: 'layui-layer-rim', //加上边框
              area: ['500px', '300px'], //宽高
              content: str
            });
              var cancelBack = document.getElementById('cancelBack')
              cancelBack.onclick = function(){
               layer.closeAll(); 
               }
        })
        /*设置发票信息*/
        $("#setFpInfo").click(function(){
            layer.open({
              type: 2,
              skin: 'layui-layer-rim', //加上边框
              area: ['660px', '500px'], //宽高
              content: 'setTIVerifyfpInfo.html'
            });
          
        })
      /*生成核销申请预览*/
      $("#create_verify_yl").click(function(){
             var val=$("input:radio[name=ionse1]:checked").val();
             var is_fapNumVal =$("input[type='text'][name='is_fapNum']").val();
            if(val==null){
                  swal("", "请将红色框内的数据填写完整！","error"); 
                $('input:radio[name=ionse1]').parents(".radioDiv").addClass("borRed");
            }else{
               $('input:radio[name=ionse1]').parents(".radioDiv").removeClass("borRed");

            };
           if(is_fapNumVal==null){
                 swal("", "请将红色框内的数据填写完整！","error"); 
                 $("input[type='text'][name='is_fapNum']").addClass("textBorder")
            }else{
                 $("input[type='text'][name='is_fapNum']").removeClass("textBorder")

            }
      });

         var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
          });
          function back(){
            history.go(-1)
        }
    </script>
</body>

</html>